home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Libraries / Core / Includes / UniversalStartup.h < prev    next >
Encoding:
Text File  |  1996-04-03  |  1.9 KB  |  59 lines  |  [TEXT/MPS ]

  1. // UniversalStartup.h
  2. // Copyright © 1995-96 by Apple Computer, Inc. All rights reserved.
  3.  
  4. #ifndef __UNIVERSALSTARTUP__
  5. #define __UNIVERSALSTARTUP__
  6.  
  7. // MacApp
  8.  
  9. #ifndef __UCOREGLOBALS__
  10. #include "UCoreGlobals.h"
  11. #endif
  12.  
  13.  
  14. //----------------------------------------------------------------------------------------
  15. // Initialization code that needs to always be compiled for 68000.
  16. //----------------------------------------------------------------------------------------
  17.  
  18. //
  19. // Support for early expansion of the heap requires that we know how
  20. // much stack space to reserve. The mem!/ppc!/68k! resources will be summed
  21. // and their results saved for later usage as well.
  22. //
  23. #if PRAGMA_ALIGN_SUPPORTED
  24. #pragma options align=mac68k
  25. #endif
  26. struct Mem
  27. {
  28.     long objectHeap, heapIncrement, codeVal, lowSpaceVal, stackVal;
  29. };
  30. #if PRAGMA_ALIGN_SUPPORTED
  31. #pragma options align=reset
  32. #endif
  33.  
  34. typedef Mem *MemPtr, **MemHandle;
  35.  
  36. extern Size gSizeObjectHeap;
  37. extern Size gSizeHeapIncrement;
  38. extern Size gSizeTempReserve;
  39. extern Size gSizeLowSpaceReserve;
  40. extern Size gStackTot;
  41.  
  42. extern Boolean gHasProcessMgr;                // saved from InitToolBox for configuration info
  43. extern Boolean gIsOnlyBackground;            // saved from InitToolBox for configuration info
  44. extern Boolean gIsHighLevelEventAware;        // saved from InitToolBox for configuration info
  45. extern short gProcessor;                    // saved from ValidateHardware for configuration info
  46. extern Boolean gHasFPU;                    // saved from ValidateHardware for configuration info
  47.  
  48. void UniversalStartup();
  49. // Call from earliest possible place in your runtime unit. As first static constructor if possible.
  50. // Initializes toolbox and calls ValidateProcessor to make certain that when this call returns you
  51. // are at least running on the processor that you were compiled to require.
  52.  
  53. Boolean ValidateProcessor();
  54.  
  55. void AlertUnsupportedConfiguration();
  56. // Call if you determine that the current machine isn't good enough. Puts up alert and quits app.
  57.  
  58. #endif // __UNIVERSALSTARTUP__
  59.